#将内容转化为URl编码格式

from urllib.parse import quote

keyword = '壁纸'

url = 'https://www.baidu.com/s?wd=' + quote(keyword)

print(url)